package beans;

import lombok.*;

import java.util.Map;

/***
 * @author hunter.d
 * @qq 657270652
 * @wx haitao-duan
 * @date 2021/3/13
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
@RequiredArgsConstructor
public class RuleEventParam {

    @NonNull
    private String eventId;

    @NonNull
    private Map<String,String> properties;

    @NonNull
    private String timeRangeStart;  // 统计时间段起始

    @NonNull
    private String timeRangeEnd;  // 统计时间段结束

    @NonNull
    private Integer judgeCount;  // 发生次数阈值

    private Integer realCount = 0; // 用于在计算中往内填实际查询到的值

    private String querySql;  // 一个事件阈值条件中附带的查询sql

    public boolean isOk(){
        return realCount>=judgeCount;
    }




}
